import Vue from 'vue'
import VueRouter from 'vue-router'
// import HomeView from '../views/HomeView.vue'
import main from '../views/main.vue'
import principal from '../views/PrincipalLogin.vue'
import register from '../views/register.vue'
import about from '../views/AboutView.vue'
import dish from '../views/DishView.vue'
import order from '../views/order.vue'
import store from '../views/store.vue'
import dishmenu from '../views/dishmenu.vue'
import storeInfo from '../views/storeInfo.vue'
import orderinfo from '../views/orderinfo.vue'
import orderback from '../views/orderback.vue'
import dishtype from '../views/DishTypeView.vue'
import desk from '../views/DeskView.vue'
Vue.use(VueRouter)

const routes = [
  // {
  //   path: '/',
  //   name: 'home',
  //   component: HomeView
  // },
  {
    path:'/main',
    name: 'main',
    component: main,
    children: [
      {
        path: '/about',
          name: "about",
          component: about
      },
      {
        path: '/dish',
          name: "dish",
          component: dish
      },
      {
        path: '/storeInfo',
        name: "storeInfo",
        component: storeInfo
      },
      {
        path: '/orderback',
        name: "orderback",
        component: orderback
      },
      {
        path: '/dishtype',
        name: "dishtype",
        component: dishtype
      },
      {
        path: '/desk',
        name: "desk",
        component: desk
      },
    ]
    
    
  },
  
  {
    path: '/orderinfo',
    name: "orderinfo",
    component: orderinfo
  },
  {
    path: '/order',
    name: "order",
    component: order
  },
  {
    path: '/store',
    name: "store",
    children:[
      {
        path: '/dishmenu',
          name: "dishmenu",
          component: dishmenu,
      },
    ],
    component: store
  },
  {
    path:'/',
    name:'principal',
    component: principal
  },
  {
    path:'/register',
    name:'register',
    component: register
  },
]

const router = new VueRouter({
  routes
})

export default router
